package sss;

import java.util.Scanner;

/**
 * @author VernHe
 * @date 2021年08月12日 16:14
 */
public class Day_03_1 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        String str = input.nextLine();
        solution(str.toCharArray());
    }

    /**
     *
     * ABCDE
     * DEABC
     * BCDEA
     * EABCD
     * CDEAB
     *
     * ABCDE
     * CDEAB
     * EABCD
     * BCDEA
     * DEABC
     * @param chars
     */

    private static void solution(char[] chars) {
        int len = chars.length;
        // 开始遍历的下标
        int startIndex = 0;
        for (int i = 0; i < len; i++) {
            for (int j = 0; j < len; j++) {
                // ABCDE
                // CDEAB
                System.out.printf(chars[(startIndex + j) % len] + "");
            }
            startIndex = (startIndex + len - 2) % len;
            System.out.println();
        }
    }
}
